package com.caochenlei.chain;

//院长审批
public class DeanApprover extends Approver {
    public DeanApprover(String name) {
        super(name);
    }

    @Override
    public void handleRequest(PurchaseRequest purchaseRequest) {
        if (purchaseRequest.getPrice() < 5000 && purchaseRequest.getPrice() <= 10000) {
            System.out.println("本次采购请求被 " + this.name + " 处理");
        } else {
            if (this.approver != null) {
                approver.handleRequest(purchaseRequest);
            }
        }
    }
}
